/**
 * SkeenZone
 * http://code.google.com/p/skeenzone
 * 
 * Copyright 2011 Kyle Prete, Jonas Michel
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *    http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */

package edu.utexas.skeenzone.messages;

import java.net.InetAddress;
import java.util.HashSet;
import java.util.Set;

import edu.utexas.skeenzone.SessionIdentifier;

public class HandshakeMessage extends HeartBeatMessage {

	private static final long serialVersionUID = 5614559568912118719L;

	private String username;
	private Set<InetAddress> ipsToConnect;
	private SessionIdentifier sid_;

	public HandshakeMessage(long clockVal, InetAddress sender, String user,
			Set<InetAddress> ips, SessionIdentifier sid) {
		super(clockVal, sender);
		username = user;
		ipsToConnect = new HashSet<InetAddress>(ips);
		sid_ = sid;
	}

	public String getUsername() {
		return username;
	}
	
	public Set<InetAddress> getIPsToConnect() {
		return ipsToConnect;
	}
	
	public SessionIdentifier getSessionID(){
		return sid_;
	}

}
